import request from '@/config/axios'

export const updateQeRoute = async (data) => {
  return await request.putDYXT({
    url: '/qeRoute/update',
    data
  })
}

export const createQeRoute = async (data) => {
  return await request.postDYXT({
    url: '/qeRoute/create',
    data
  })
}

export const getQeRoutePage = async (params) => {
  return await request.getDYXT({
    url: '/qeRoute/page',
    params
  })
}

export const getQeRoute = async (params) => {
  return await request.getDYXT({
    url: '/qeRoute/get',
    params
  })
}

export const deleteQeRoute = async (params) => {
  return await request.deleteDYXT({
    url: '/qeRoute/delete',
    params
  })
}

export const bindVehicles = async (data) => {
  return await request.putDYXT({
    url: '/qeRoute/bindVehicles',
    data
  })
}

export const updateRouteVehicle = async (data) => {
  return await request.putDYXT({
    url: '/qeRoute/updateRouteVehicle',
    data
  })
}

export const getVehiclesById = async (params) => {
  return await request.getDYXT({
    url: '/qeRoute/getVehiclesById',
    params
  })
}

export const deleteRouteVehicleById = async (params) => {
  return await request.deleteDYXT({
    url: '/qeRoute/deleteRouteVehicleById',
    params
  })
}
